<?php
class ReportComponent extends CComponent
{
	/*
	 * Report status
	 */
	const REPORT_ACTIVED = 1;
	const REPORT_SUBMITTED = 2;
	const REPORT_APPROVED = 3;
	const REPORT_REJECTED = 4;
	/**
	 *
	 * Enter description here ...
	 * @param int $limit
	 * @param tinyint $status
	 */
	public function getReportsLimit($limit,$status)
	{
		$command = Yii::app()->db->createCommand("EXEC stp_GetReportsActivedLimited :Limit, :Status");
		$command->bindValue(':Limit', $limit, PDO::PARAM_INT);
		$command->bindValue(':Status', $status, PDO::PARAM_INT);
		return $command->queryAll();
	}
}